package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpCertificateAddDTO;
import org.jsola.hr.dto.EmpCertificateUpdateDTO;
import org.jsola.hr.query.EmpCertificateQuery;
import org.jsola.hr.vo.EmpCertificateListVO;
import org.jsola.hr.vo.EmpCertificateVO;

import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工证书")
public interface IEmpCertificateControllerAPI {

    /**
     * 新增员工证书
     * @param empCertificateAddDTO 员工证书新增实体
     * @return 员工证书展示对象
     */
    @ApiOperation(value = "新增员工证书")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateAddDTO", dataType = "EmpCertificateAddDTO", value = "新增员工证书", paramType = "body")
    })
    Result<EmpCertificateVO> save(EmpCertificateAddDTO empCertificateAddDTO);


    /**
     * 修改员工证书
     * @param empCertificateUpdateDTO 员工证书
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工证书")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateUpdateDTO", dataType = "EmpCertificateUpdateDTO", value = "修改员工证书", paramType = "body")
    })
    Result<Integer> update(EmpCertificateUpdateDTO empCertificateUpdateDTO);




    /**
     * 删除单个员工证书，彻底删除
     * @param empCertificateId 员工证书id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工证书，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateId", dataType = "String", value = "员工证书id", paramType = "path")
    })
    Result<Integer> delete(String empCertificateId);


    /**
     * 批量删除员工证书，彻底删除
     * @param empCertificateIds 员工证书id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工证书，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateIds", dataType = "String[]", value = "员工证书id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empCertificateIds);


    /**
     * 根据员工证书id查询员工证书详情
     * @param empCertificateId 员工证书id
     * @return 员工证书详情
     */
    @ApiOperation(value="根据员工证书id查询员工证书详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateId", dataType = "String", value = "员工证书id", paramType = "path")
    })
    Result<EmpCertificateVO> findById(String empCertificateId);


    /**
     * 查询员工证书
     * @param empCertificateQuery 员工证书查询参数
     * @return page
     */
    @ApiOperation(value="查询员工证书")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateQuery", dataType = "EmpCertificateQuery", value = "员工证书查询参数", paramType = "query")
    })
    Result<List<EmpCertificateListVO>> listAll(EmpCertificateQuery empCertificateQuery);


     /**
     * 分页查询员工证书
     * @param empCertificateQuery 员工证书查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工证书")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateQuery", dataType = "EmpCertificateQuery", value = "员工证书查询参数", paramType = "query")
    })
    Result<Page<EmpCertificateListVO>> page(EmpCertificateQuery empCertificateQuery);

    /**
     * 删除员工证书
     * @param empCertificateId 员工证书id
     * @return 删除数量
     */
    @ApiOperation(value="删除员工证书")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empCertificateId", dataType = "String", value = "员工证书id", paramType = "path")
    })
    Result<Integer> deleteEmpCertificate(String empCertificateId);


}

